#include <algorithm>
#include <vector>
#include <list>
#include <iterator>
#include <iostream>
namespace Me{
    template<class BidIt>
    void __reverse(BidIt first, BidIt last, std::bidirectional_iterator_tag)
    {

    }
    template<class RanIt>
    void __reverse(RanIt first, RanIt last, std::random_access_iterator_tag)
    {

    }
    template<class BidIt>
    void reverse(BidIt first, BidIt last)
    {
        return __reverse(first, last, std::iterator_traits<BidIt>::iterator_category());
    }
}

int main()
{
    using namespace std;
    int i[] = {0, 1, 2, 3, 4, 5};
    vector<int> vi(i, i + 6);
    copy(vi.begin(), vi.end(), ostream_iterator<int>(cout, " "));
    cout << endl;
    Me::reverse(vi.begin(), vi.end());
    copy(vi.begin(), vi.end(), ostream_iterator<int>(cout, " "));


}